package src.main.java.org.collection.parameter;

import java.util.Arrays;

/*可变参数*/
public class Test {
    public static void main(String[] args) {
        test();
        test(10);
        test(10,20,30);
        test(new int[]{10,20,30,40});
    }
    public static void test(int...nums){
        //可变参数在方法内部，本质是一个数组
        System.out.println(nums.length);
        System.out.println(Arrays.toString(nums));
    }
}

